package com.citcc.business.service;

import com.citcc.business.bean.CdzAmountDetail;
import com.citcc.business.bean.CdzIndent;
import com.citcc.business.bean.UserOrderEntity;
import com.citcc.business.bean.dto.CdzAmountDetailCon;
import com.citcc.business.bean.dto.CdzDto;
import com.citcc.business.mapper.CdzAmountDetailMapper;
import com.citcc.business.mapper.CdzIndentMapper;
import com.citcc.business.mapper.UserOrderEntityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CdzBalanceLService {

    private final CdzAmountDetailMapper cdzAmountDetailMapper;

    @Autowired
    public CdzBalanceLService(CdzAmountDetailMapper cdzAmountDetailMapper){
        this.cdzAmountDetailMapper=cdzAmountDetailMapper;
    }

    public List<CdzAmountDetail> selectList(CdzAmountDetailCon con){
        return cdzAmountDetailMapper.selectList(con);
    }

    public int delete(String id){
        return cdzAmountDetailMapper.deleteByPrimaryKey(id);
    }

    //统计金额
    public Map<String,Object> selectSumDetail(CdzAmountDetailCon con){
        return cdzAmountDetailMapper.selectSumDetail(con);
    }
}
